<?php
/*
 * @Author: your name
 * @Date: 2019-12-20 09:52:19
 * @LastEditTime: 2020-12-28 09:55:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /ahsmp_3/application/adminapiv3/controller/CmdsHistory.php
 */
namespace app\adminapiv3\controller\platform_manage\log;

use app\adminapiv3\controller\BaseController;
use app\adminapiv3\service;
use think\Request;

class CmdsHistoryController extends BaseController
{
    /**
     * @name: 列表
     * @Param: 
     * @Description: 
     * @Author: foo
     * @Date: 2019-12-20 09:53:24
     */
    public function list ()
    {
        $ServerSocketMessageHistory = new service\platform_manage\log\CmdsHistoryService();
        $data = $ServerSocketMessageHistory->list();
        
        return $this->jsonOutPut($data);
    }

    /**
     * @name: 错误条数
     * @Param: 
     * @Description: 
     * @Author: foo
     * @Date: 2020-01-03 14:22:01
     */
    public function errCount ()
    {
        $ServerSocketMessageHistory = new service\platform_manage\log\CmdsHistoryService();
        $data = $ServerSocketMessageHistory->errorCount();

        return $this->jsonOutPut($data);
    }

    /**
     * @name: 忽略错误
     * @Param: 
     * @Description: 
     * @Author: foo
     * @Date: 2020-01-03 14:23:13
     */
    public function ignore (Request $request)
    {
        $id_s = $request->only(['id'],'post');
        $ServerSocketMessageHistory = new service\platform_manage\log\CmdsHistoryService();
        $ServerSocketMessageHistory->ignore($id_s);

        return $this->jsonOutPut();
    }
}
